package run
import(
	. "nightowl/http"
	"strconv"
)

type RunSync struct{
	
}
var RunSyncSvc *RunSync
func (svc *RunSync) UpdateStatus(id uint64, status string) {
	ApiRequest("run", "updateStatus",
		RequestParams{
		PathVars: map[string]interface{}{"id": strconv.FormatUint(id, 10)}, 
		Params: map[string]interface{}{"status": status}, 
		Headers:map[string]string{"content-type":"application/json"},
	})
}
func (svc *RunSync) UpdateTaskStatus(deliveryTaskId uint64, status string) {
	ApiRequest("run", "updateTaskStatus",
		RequestParams{
		PathVars: map[string]interface{}{"id": strconv.FormatUint(deliveryTaskId, 10)}, 
		Params: map[string]interface{}{"status": status}, 
		Headers:map[string]string{"content-type":"application/json"},
	})
}
func (svc *RunSync) UpdateStepStatus(deliveryStepId uint64, status string) {
	ApiRequest("run", "updateStepStatus",
		RequestParams{
		PathVars: map[string]interface{}{"id": strconv.FormatUint(deliveryStepId, 10)}, 
		Params: map[string]interface{}{"status": status}, 
		Headers:map[string]string{"content-type":"application/json"},
	})
}

func init(){
	RunSyncSvc = &RunSync{

	}
}